home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
DEM
/
S-Z
/
Special Delivery™ Demo.cpt
/
Special Delivery™ Demo
/
Claris
/
Claris Translators
/
EPSF.rsrc
/
PS_206
< prev
next >
Wrap
Text File
|
1991-06-19
|
5KB
|
263 lines
/StripFromFront {
dup length
2 index sub
3 1 roll
exch 3 -1 roll
getinterval
} bind def
/MakePathArray {
/k 0 def
{/k k 1 add def pop pop}{/k k 1 add def pop pop}{/k k 1 add def pop pop pop pop pop pop}{/k k 1 add def }pathforall
k array
/k 0 def
{{moveto} 3 array astore 1 index k 3 -1 roll put /k k 1 add def}
{{lineto} 3 array astore 1 index k 3 -1 roll put /k k 1 add def}
{{curveto} 7 array astore 1 index k 3 -1 roll put /k k 1 add def}
{{closepath} 1 array astore 1 index k 3 -1 roll put /k k 1 add def}
pathforall
}bind def
/MakeFlatPathArray {
/k 0 def
{/k k 1 add def pop pop}{/k k 1 add def pop pop}{pop pop pop pop pop pop}{}pathforall
k array
/k 0 def
{{moveto} 3 array astore 1 index k 3 -1 roll put /k k 1 add def}
{{lineto} 3 array astore 1 index k 3 -1 roll put /k k 1 add def}
{ pop pop pop pop pop pop}
{}
pathforall
}bind def
/FractionalLine {
2 index sub
.00001 mul
exch
3 index sub
.00001 mul
4 -1 roll add
3 1 roll
add
} bind def
/calcLineLength {
exch
4 -1 roll
sub
dup mul
3 1 roll exch
sub
dup mul
add sqrt
} bind def
/InitTotalLineLength {
/oldY exch def
/oldX exch def
theDash aload pop currentLineLength add setdash
} bind def
/AccumeLineLength {
3 copy pop
2 copy
oldX oldY
4 2 roll calcLineLength
/segmentLength exch def
/currentLineLength currentLineLength segmentLength add def
/oldY exch def
/oldX exch def
} bind def
/DecumeLastLineLength {
/currentLineLength currentLineLength segmentLength sub def
} bind def
/DrawFlattendSegment {
/pointCount 2 def
dup 0 lt { pop 0 } if
fpc
3 1 roll
2 index
1 index
gt {
2 copy get
dup length
dup 3 eq {
pop
dup 0 get
exch 1 get
2 copy InitTotalLineLength
m
} {
} ifelse
} {
pop 1 index
} ifelse
dup 1 add
3 index
exch sub
dup 10 gt { pop 10} if
{
1 add
2 copy
get aload pop
AccumeLineLength
exec
} repeat
3 1 roll pop pop
DecumeLastLineLength
} bind def
/IncFPC {
fpc add
/fpc exch def
} bind def
/DrawFlatPathArray {
fpc
0 {
dup 2 index
1 sub
lt {
flatPathArray exch
newpath
1 sub DrawFlattendSegment
gsave
pathSegProc
grestore
newpath
}
{
pop pop
exit
} ifelse
} loop
} bind def
/RecordFirstSubSegment {
closepathArray 0 pathArray 0 get
put
closepathArray 1
pathArray 0 get aload pop pop
pathArray 1 get dup length 3 eq {
aload pop pop
} {
newpath
0 0 moveto
aload pop exec
/segmentArray flattenpath MakeFlatPathArray def
segmentArray 1 get aload pop pop
} ifelse
FractionalLine {lineto} 3 array astore
put
} bind def
/AppendClosePath {
closepathArray 0 get 2 {lineto} put
flatPathArray fpc closepathArray 0 get put
1 IncFPC
flatPathArray fpc closepathArray 1 get put
1 IncFPC
} bind def
/RecordCurrentDash {
/theDash
currentdash 2 array astore def
/currentLineLength 0 def
} bind def
/PatternStroke {
0 setlinecap
RecordCurrentDash
/saveFlat currentflat def
.5 setflat
/pathArray MakePathArray def
/closepathArray 2 array def
/pathLength pathArray length def
/flatPathArray 513 array def
/currentLineLength 0 def
/fpc 0 def
pathArray pathLength 1 sub get
length 1 eq {
/usingClosepath true def
RecordFirstSubSegment
/pathLength pathLength 1 sub def
} {
/usingClosepath false def
} ifelse
0 1 pathLength 1 sub {
pathArray exch get
dup length 3 eq {
fpc 1 add 512 ge {
DrawFlatPathArray
fpc 2 ge {
flatPathArray flatPathArray fpc 2 sub get 0 put
flatPathArray flatPathArray fpc 1 sub get 1 put
/fpc 2 def
}{
/fpc 0 def
} ifelse
} if
flatPathArray exch fpc exch put
1 IncFPC
} {
dup length 7 eq {
newpath
/nToStrip 0 def
fpc 1 gt {
flatPathArray fpc 2 sub get aload pop pop m
flatPathArray fpc 1 sub get aload pop exec
/nToStrip 2 def
} {
fpc 1 eq {
flatPathArray fpc 1 sub get aload pop exec
/nToStrip 2 def
} if
} ifelse
aload pop exec
/segmentArray flattenpath MakeFlatPathArray def
/segmentArray nToStrip segmentArray StripFromFront def
segmentArray length fpc add 512 lt {
flatPathArray fpc segmentArray putinterval
segmentArray length IncFPC
} {
DrawFlatPathArray
fpc 1 gt {
flatPathArray flatPathArray fpc 2 sub get 0 exch put
flatPathArray flatPathArray fpc 1 sub get 1 exch put
/fpc 2 def
}{
/fpc 0 def
} ifelse
segmentArray length 512 lt {
flatPathArray fpc segmentArray putinterval
segmentArray length IncFPC
} {
segmentArray length
/exitLoop false def
0
{
2 copy sub
dup 500 gt {
pop 500
} {
/exitLoop true def
} ifelse
segmentArray 2 index 2 index getinterval
flatPathArray fpc 3 -1 roll putinterval
dup IncFPC
add
exitLoop {
exit
} {
DrawFlatPathArray
fpc 1 gt {
flatPathArray flatPathArray fpc 2 sub get 0 exch put
flatPathArray flatPathArray fpc 1 sub get 1 exch put
/fpc 2 def
}{
/fpc 0 def
} ifelse
} ifelse
} loop
} ifelse
} ifelse
} if
} ifelse
} for
fpc 0 gt {
usingClosepath {
AppendClosePath
} if
DrawFlatPathArray
} if
saveFlat setflat
} bind def